// 浏览器启动
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; // 部分组件依赖angular动画，可能需要引入animations模块
import { AppModule } from './app/app.module';
import { enableProdMode } from "@angular/core";

import { environment } from "./environments/enviroment";
declare const require: any;
if (environment.production) {
  // 开启生产环境
  enableProdMode()
}
if (environment.useMock) {
  import(require("./app/mock/index.js")).then(()=>{
    console.log("引入mockjs成功");
  }).catch(()=>{
    console.log("引入失败");
  })
}
// 启动模块
platformBrowserDynamic().bootstrapModule(AppModule)
  .catch(err => console.error(err));
